projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dcf51b3
)
Fix xm new -F -- this fix was recently introduced for xm create.
author
Ewan Mellor
<ewan@xensource.com>
Wed, 29 Nov 2006 12:16:19 +0000
(12:16 +0000)
committer
Ewan Mellor
<ewan@xensource.com>
Wed, 29 Nov 2006 12:16:19 +0000
(12:16 +0000)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xm/new.py
patch
|
blob
|
history
diff --git
a/tools/python/xen/xm/new.py
b/tools/python/xen/xm/new.py
index fec2fc76e66a072c521434656c63654734b6fabc..7af65510a97ec6d85350274100d5d9d2f7d6237c 100644
(file)
--- a/
tools/python/xen/xm/new.py
+++ b/
tools/python/xen/xm/new.py
@@
-58,6
+58,12
@@
def main(argv):
if not opts:
return
+ if type(config) == str:
+ try:
+ config = sxp.parse(file(config))[0]
+ except IOError, exn:
+ raise OptionError("Cannot read file %s: %s" % (config, exn[1]))
+
if opts.vals.dryrun:
PrettyPrint.prettyprint(config)
else: